<template>
	<view class="form-item">
		<view class="form-title">{{title}}</view>
		<view class="form-input">
			<input v-if="!haveSlot" :placeholder="placeholder" :name="name" style="height:2.5rem;font-size:14px;" 
				:disabled="disable" placeholder-style="color:#a1a1a1" :value="value"/>
			<slot></slot>
		</view>
	</view>
</template>

<script setup>
	defineProps({
		title:{
			type:String,
			default:''
		},
		placeholder:{
			default:''
		},
		name:{
			type:String,
			default:''
		},
		disable:{
			type:Boolean,
			default:false
		},
		value:{
			type:Number,
			dafault:0
		},
		haveSlot:{
			type:Boolean,
			default:0
		}
	})

</script>

<style lang="scss">
.form-item {
	height: 2.5rem;
	line-height: 2.5rem;
	.form-title {
		float: left;
		width: 120rpx;
		padding: 0 20rpx;
		padding-right: 30px;
		font-size: 14px;
	}
	.form-input{
		float: left;

		width: calc(100% - 200rpx);
		font-size: 14px;
	}
}
</style>